{{- define "aws_cloud_config" }}
[Global]
KubernetesClusterID = {{ .Values.global.discovery.clusterUUID | quote }}
ElbSecurityGroup = {{ .Values.cloudProviderAws.internal.loadBalancerSecurityGroup | quote }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
  name: cloud-controller-manager
  namespace: d8-{{ .Chart.Name }}
  {{- include "helm_lib_module_labels" (list . (dict "app" "cloud-controller-manager")) | nindent 2 }}
type: Opaque
data:
  cloud-config: {{ include "aws_cloud_config" . | b64enc | quote }}
  aws-access-key-id: {{ .Values.cloudProviderAws.internal.providerAccessKeyId | b64enc | quote }}
  aws-secret-access-key: {{ .Values.cloudProviderAws.internal.providerSecretAccessKey | b64enc | quote }}
